home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / QuickDraw 3D / Development / Interfaces / QD3DPascalInterfaces / QD3DGroup.p < prev    next >
Encoding:
Text File  |  1996-11-15  |  8.2 KB  |  188 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        QD3DGroup.p
  3.  
  4.      Version:    Technology:    Quickdraw 3D 1.0.6
  5.                  Release:    Universal Interfaces 2.1.5d1
  6.  
  7.      Copyright:    © 1984-1996 by Apple Computer, Inc.  All rights reserved.
  8.  
  9.      Bugs?:        If you find a problem with this file, send the file and version
  10.                  information (from above) and the problem description to:
  11.  
  12.                      Internet:    apple.bugs@applelink.apple.com
  13.                      AppleLink:    APPLE.BUGS
  14.  
  15. }
  16. {$IFC UNDEFINED UsingIncludes}
  17. {$SETC UsingIncludes := 0}
  18. {$ENDC}
  19.  
  20. {$IFC NOT UsingIncludes}
  21.  UNIT QD3DGroup;
  22.  INTERFACE
  23. {$ENDC}
  24.  
  25. {$IFC UNDEFINED __QD3DGROUP__}
  26. {$SETC __QD3DGROUP__ := 1}
  27.  
  28. {$I+}
  29. {$SETC QD3DGroupIncludes := UsingIncludes}
  30. {$SETC UsingIncludes := 1}
  31.  
  32. {$IFC UNDEFINED __QD3D__}
  33. {$I QD3D.p}
  34. {$ENDC}
  35.  
  36. {$PUSH}
  37. {$ALIGN POWER}
  38. {$LibExport+}
  39.  
  40. {
  41. *****************************************************************************
  42.  **                                                                             **
  43.  **                            Group Typedefs                                     **
  44.  **                                                                             **
  45.  ****************************************************************************
  46. }
  47. {
  48.  * These flags affect how a group is traversed
  49.  * They apply to when a group is "drawn", "picked", "bounded", "written"
  50. }
  51.  
  52. TYPE
  53.     TQ3DisplayGroupStateMasks     = LONGINT;
  54. CONST
  55.     kQ3DisplayGroupStateNone    = {TQ3DisplayGroupStateMasks}0;
  56.     kQ3DisplayGroupStateMaskIsDrawn = {TQ3DisplayGroupStateMasks}$01;
  57.     kQ3DisplayGroupStateMaskIsInline = {TQ3DisplayGroupStateMasks}$02;
  58.     kQ3DisplayGroupStateMaskUseBoundingBox = {TQ3DisplayGroupStateMasks}$04;
  59.     kQ3DisplayGroupStateMaskUseBoundingSphere = {TQ3DisplayGroupStateMasks}$08;
  60.     kQ3DisplayGroupStateMaskIsPicked = {TQ3DisplayGroupStateMasks}$10;
  61.     kQ3DisplayGroupStateMaskIsWritten = {TQ3DisplayGroupStateMasks}$20;
  62.  
  63.  
  64. TYPE
  65.     TQ3DisplayGroupState                = LONGINT;
  66. {
  67. *****************************************************************************
  68.  **                                                                             **
  69.  **                    Group Routines (apply to all groups)                     **
  70.  **                                                                             **
  71.  ****************************************************************************
  72. }
  73. FUNCTION Q3Group_New: TQ3GroupObject; C;
  74. FUNCTION Q3Group_GetType(group: TQ3GroupObject): TQ3ObjectType; C;
  75. FUNCTION Q3Group_AddObject(group: TQ3GroupObject; object: TQ3Object): TQ3GroupPosition; C;
  76. FUNCTION Q3Group_AddObjectBefore(group: TQ3GroupObject; position: TQ3GroupPosition; object: TQ3Object): TQ3GroupPosition; C;
  77. FUNCTION Q3Group_AddObjectAfter(group: TQ3GroupObject; position: TQ3GroupPosition; object: TQ3Object): TQ3GroupPosition; C;
  78. FUNCTION Q3Group_GetPositionObject(group: TQ3GroupObject; position: TQ3GroupPosition; VAR object: TQ3Object): TQ3Status; C;
  79. FUNCTION Q3Group_SetPositionObject(group: TQ3GroupObject; position: TQ3GroupPosition; object: TQ3Object): TQ3Status; C;
  80. FUNCTION Q3Group_RemovePosition(group: TQ3GroupObject; position: TQ3GroupPosition): TQ3Object; C;
  81. FUNCTION Q3Group_GetFirstPosition(group: TQ3GroupObject; VAR position: TQ3GroupPosition): TQ3Status; C;
  82. FUNCTION Q3Group_GetLastPosition(group: TQ3GroupObject; VAR position: TQ3GroupPosition): TQ3Status; C;
  83. FUNCTION Q3Group_GetNextPosition(group: TQ3GroupObject; VAR position: TQ3GroupPosition): TQ3Status; C;
  84. FUNCTION Q3Group_GetPreviousPosition(group: TQ3GroupObject; VAR position: TQ3GroupPosition): TQ3Status; C;
  85. FUNCTION Q3Group_CountObjects(group: TQ3GroupObject; VAR nObjects: LONGINT): TQ3Status; C;
  86. FUNCTION Q3Group_EmptyObjects(group: TQ3GroupObject): TQ3Status; C;
  87. {
  88.  *     Typed Access
  89. }
  90. FUNCTION Q3Group_GetFirstPositionOfType(group: TQ3GroupObject; isType: TQ3ObjectType; VAR position: TQ3GroupPosition): TQ3Status; C;
  91. FUNCTION Q3Group_GetLastPositionOfType(group: TQ3GroupObject; isType: TQ3ObjectType; VAR position: TQ3GroupPosition): TQ3Status; C;
  92. FUNCTION Q3Group_GetNextPositionOfType(group: TQ3GroupObject; isType: TQ3ObjectType; VAR position: TQ3GroupPosition): TQ3Status; C;
  93. FUNCTION Q3Group_GetPreviousPositionOfType(group: TQ3GroupObject; isType: TQ3ObjectType; VAR position: TQ3GroupPosition): TQ3Status; C;
  94. FUNCTION Q3Group_CountObjectsOfType(group: TQ3GroupObject; isType: TQ3ObjectType; VAR nObjects: LONGINT): TQ3Status; C;
  95. FUNCTION Q3Group_EmptyObjectsOfType(group: TQ3GroupObject; isType: TQ3ObjectType): TQ3Status; C;
  96. {
  97.  *    Determine position of objects in a group
  98. }
  99. FUNCTION Q3Group_GetFirstObjectPosition(group: TQ3GroupObject; object: TQ3Object; VAR position: TQ3GroupPosition): TQ3Status; C;
  100. FUNCTION Q3Group_GetLastObjectPosition(group: TQ3GroupObject; object: TQ3Object; VAR position: TQ3GroupPosition): TQ3Status; C;
  101. FUNCTION Q3Group_GetNextObjectPosition(group: TQ3GroupObject; object: TQ3Object; VAR position: TQ3GroupPosition): TQ3Status; C;
  102. FUNCTION Q3Group_GetPreviousObjectPosition(group: TQ3GroupObject; object: TQ3Object; VAR position: TQ3GroupPosition): TQ3Status; C;
  103. {
  104. *****************************************************************************
  105.  **                                                                             **
  106.  **                            Group Subclasses                                 **
  107.  **                                                                             **
  108.  ****************************************************************************
  109. }
  110. FUNCTION Q3LightGroup_New: TQ3GroupObject; C;
  111. FUNCTION Q3InfoGroup_New: TQ3GroupObject; C;
  112. {
  113. *****************************************************************************
  114.  **                                                                             **
  115.  **                        Display Group Routines                                 **
  116.  **                                                                             **
  117.  ****************************************************************************
  118. }
  119. FUNCTION Q3DisplayGroup_New: TQ3GroupObject; C;
  120. FUNCTION Q3DisplayGroup_GetType(group: TQ3GroupObject): TQ3ObjectType; C;
  121. FUNCTION Q3DisplayGroup_GetState(group: TQ3GroupObject; VAR state: TQ3DisplayGroupState): TQ3Status; C;
  122. FUNCTION Q3DisplayGroup_SetState(group: TQ3GroupObject; state: TQ3DisplayGroupState): TQ3Status; C;
  123. FUNCTION Q3DisplayGroup_Submit(group: TQ3GroupObject; view: TQ3ViewObject): TQ3Status; C;
  124. {
  125. *****************************************************************************
  126.  **                                                                             **
  127.  **        Ordered Display Group                                                  **
  128.  **                                                                             **
  129.  **        Ordered display groups keep objects in order by the type of object:     **
  130.  **                                                                             **
  131.  **        1    kQ3ShapeTypeTransform                                             **
  132.  **        2    kQ3ShapeTypeStyle                                                  **
  133.  **        3    kQ3SetTypeAttribute                                                  **
  134.  **        4    kQ3ShapeTypeShader                                                  **
  135.  **        5    kQ3ShapeTypeCamera                                                  **
  136.  **        6    kQ3ShapeTypeLight                                                  **
  137.  **        7    kQ3ShapeTypeGeometry                                             **
  138.  **        8    kQ3ShapeTypeGroup                                                 **            
  139.  **        9    kQ3ShapeTypeUnknown                                                 **
  140.  **                                                                             **
  141.  **        Within a type, you are responsible for keeping things in order.         **
  142.  **                                                                             **
  143.  **        You may access and/or manipulate the group using the above types      **
  144.  **        (fast), or you may use any parent or leaf class types (slower).         **
  145.  **                                                                             **
  146.  **        Additional types will be added as functionality grows.                 **
  147.  **                                                                             **
  148.  **        The group calls which access by type are much faster for ordered     ** 
  149.  **        display group for the types above.                                     **
  150.  **                                                                             **
  151.  **        N.B. In QuickDraw 3D 1.0 Lights and Cameras are a no-op when drawn.     **
  152.  **                                                                             **
  153.  ****************************************************************************
  154. }
  155. FUNCTION Q3OrderedDisplayGroup_New: TQ3GroupObject; C;
  156. {
  157. *****************************************************************************
  158.  **                                                                             **
  159.  **        IO Proxy Display Group                                                  **
  160.  **                                                                             **
  161.  **        IO Proxy display groups are used to place more than one              **
  162.  **        representation of an object in a metafile. For example, if you know     **
  163.  **        another program does not understand NURBPatches but does understand  **
  164.  **        Meshes, you may place a mesh and a NURB Patch in an IO Proxy Group,  **
  165.  **        and the reading program will select the desired representation.         **
  166.  **                                                                             **
  167.  **        Objects in an IO Proxy Display Group are placed in their preferencial**
  168.  **        order, with the FIRST object being the MOST preferred, the LAST      **
  169.  **        object the least preferred.                                             **
  170.  **                                                                             **
  171.  **        The behavior of an IO Proxy Display Group is that when drawn/picked/ **
  172.  **        bounded, the first object in the group that is not "Unknown" is used,**
  173.  **        and the other objects ignored.                                         **
  174.  **                                                                             **
  175.  ****************************************************************************
  176. }
  177. FUNCTION Q3IOProxyDisplayGroup_New: TQ3GroupObject; C;
  178. {$ALIGN RESET}
  179. {$POP}
  180.  
  181. {$SETC UsingIncludes := QD3DGroupIncludes}
  182.  
  183. {$ENDC} {__QD3DGROUP__}
  184.  
  185. {$IFC NOT UsingIncludes}
  186.  END.
  187. {$ENDC}
  188.